package lambda;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

public class MxMapLambda {
    public static void main(String[] args) {
        Map<String, Map<String, Bean>> map = new ConcurrentHashMap<>();
        for (int i = 0; i < 3; i++) {
            map.put("M" + i, new ConcurrentHashMap<>());
            for (int k = 0; k < 3; k++) {
                map.get("M" + i).put("B" + k, new Bean("B" + k, (double) k));
            }
        }

        List list = map.entrySet().stream()
                .filter(i -> i.getKey().equals("M1"))
                .map(Map.Entry::getValue)
                .collect(Collectors.toList());

        System.out.println(list);
    }
}
